package net.randomice.emf.observables.runtime;

import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;

public interface IObservableObject<I extends EObject> {
	public interface AbstractCreator<I extends EObject, R extends IObservableObject<I>> {
		public R createRoot(I object);
	}

	public interface Creator<I extends EObject, R extends IObservableObject<I>>
			extends AbstractCreator<I, R> {
		public R createRoot();
	}

	I getValue();

	void setValue(I object);

	IObservableValue getValueFeature(EStructuralFeature feature);

	IObservableList getListFeature(EStructuralFeature feature);

	IObservableObject<?> getValueObject(EReference feature);

	IObservableAbstractListObject<?> getListObject(EReference feature);

	IObservableValue getObservable();

	EClass eClass();

}
